package com.currency.mall.ui.main;

/**
 * Created by lihaoqi on 2017/10/30.
 */

public class MainPresenter implements MainContract.Presenter{


    private final MainContract.View mView;

    public MainPresenter(MainContract.View mMainView) {
        this.mView = mMainView;
    }


    @Override
    public void getUpdateInfo() {
//        HashMap<String,String> hashMap = new HashMap<>();
//        hashMap.put("platform","1");
//        NetWork.getApplyGoodsApi().getInfo(hashMap)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//                .subscribe(new Observer<ResponseInfo<UpdateData>>() {
//                    @Override
//                    public void onCompleted() {
//
//                    }
//
//                    @Override
//                    public void onError(Throwable e) {
//                    }
//
//                    @Override
//                    public void onNext(ResponseInfo<UpdateData> updateDataResponseInfo) {
//                        if(updateDataResponseInfo.getStatus()== Constant.OK_CODE){
//                            try {
//                                UpdateData bean = updateDataResponseInfo.getResult();
//                                String webVerCode = bean.getVersion();
//                                String nowVerCode = DeviceInfoUtil.getAppVersion(MallApplication.getInstance());
//                                if(webVerCode.compareTo(nowVerCode)>0){
////                                    mView.showUpdateDialog(bean);
//                                }
//                            }catch (Exception e){
//
//                            }
//                        }
//                    }
//                });
    }
}
